﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Exhibition.Common.Helper;
using Exhibition.Dao.ViewModel;

namespace Exhibition.Service
{
    public class NavTreeList : IDropDownTree
    {
        public Dictionary<string, string> GetChildList(string parentID)
        {
            List<NavModel> areas = CenterService.navService.GetListByPid(Convert.ToInt32(parentID));
            //MembershipService.GetUser().UserSysRight.AreaIds

            if (areas != null && areas.Count > 0)
            {
                Dictionary<string, string> arealist = new Dictionary<string, string>();
                foreach (var tp in areas)
                {
                    arealist.Add(tp.Id.ToString(), tp.NavName);
                }
                return arealist;
            }
            return null;
        }

        public DropDownTree DropDownTree
        {
            get { return new DropDownTree(this); }
        }

        public void Dispose()
        {

        }
    }
}
